/*
 *  txdnet.cn tonydon
 * 
 */
package cn.txdnet.txcms.query;

import java.sql.Date;
import txdnet.util.StaticMark;

/**
 *
 * @author txdnet
 */
public class EventsQuery extends BaseQuery{
    private static final long serialVersionUID = 3970247489782779038L;

    private Byte pubstate;

    private Integer beginHitNum;
    private Integer endHitNum;

    private Byte cmstype;
    private Integer id;
    private Integer cid;
    private Byte channeltype;

    private Date pubBeginTime;
    private Date pubEndTime;
    private Date stopBeginTime;
    private Date stopEndTime;
    private Long pubBeginTimeMs;
    private Long pubEndTimeMs;
    private Long stopBeginTimeMs;
    private Long stopEndTimeMs;
    
    private String titleKeyword;
    
    @Override
    public void filter() {
        if (pubBeginTime != null && pubEndTime != null) {
            pubBeginTimeMs = pubBeginTime.getTime();
            pubEndTimeMs = pubEndTime.getTime();
        }
        if (stopBeginTime != null && stopEndTime != null) {
            stopBeginTimeMs = stopBeginTime.getTime();
            stopEndTimeMs = stopEndTime.getTime();
        }
        if (titleKeyword != null) {
            titleKeyword = StaticMark.STR_PERCENT.concat(titleKeyword).concat(StaticMark.STR_PERCENT);
        }
    }

    /**
     * @return the pubstate
     */
    public Byte getPubstate() {
        return pubstate;
    }

    /**
     * @param pubstate the pubstate to set
     */
    public void setPubstate(Byte pubstate) {
        this.pubstate = pubstate;
    }

    /**
     * @return the beginHitNum
     */
    public Integer getBeginHitNum() {
        return beginHitNum;
    }

    /**
     * @param beginHitNum the beginHitNum to set
     */
    public void setBeginHitNum(Integer beginHitNum) {
        this.beginHitNum = beginHitNum;
    }

    /**
     * @return the endHitNum
     */
    public Integer getEndHitNum() {
        return endHitNum;
    }

    /**
     * @param endHitNum the endHitNum to set
     */
    public void setEndHitNum(Integer endHitNum) {
        this.endHitNum = endHitNum;
    }

    /**
     * @return the cmstype
     */
    public Byte getCmstype() {
        return cmstype;
    }

    /**
     * @param cmstype the cmstype to set
     */
    public void setCmstype(Byte cmstype) {
        this.cmstype = cmstype;
    }

    /**
     * @return the id
     */
    public Integer getId() {
        return id;
    }

    /**
     * @param id the id to set
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * @return the cid
     */
    public Integer getCid() {
        return cid;
    }

    /**
     * @param cid the cid to set
     */
    public void setCid(Integer cid) {
        this.cid = cid;
    }

    /**
     * @return the channeltype
     */
    public Byte getChanneltype() {
        return channeltype;
    }

    /**
     * @param channeltype the channeltype to set
     */
    public void setChanneltype(Byte channeltype) {
        this.channeltype = channeltype;
    }

    /**
     * @return the pubBeginTime
     */
    public Date getPubBeginTime() {
        return pubBeginTime;
    }

    /**
     * @param pubBeginTime the pubBeginTime to set
     */
    public void setPubBeginTime(Date pubBeginTime) {
        this.pubBeginTime = pubBeginTime;
    }

    /**
     * @return the pubEndTime
     */
    public Date getPubEndTime() {
        return pubEndTime;
    }

    /**
     * @param pubEndTime the pubEndTime to set
     */
    public void setPubEndTime(Date pubEndTime) {
        this.pubEndTime = pubEndTime;
    }

    /**
     * @return the stopBeginTime
     */
    public Date getStopBeginTime() {
        return stopBeginTime;
    }

    /**
     * @param stopBeginTime the stopBeginTime to set
     */
    public void setStopBeginTime(Date stopBeginTime) {
        this.stopBeginTime = stopBeginTime;
    }

    /**
     * @return the stopEndTime
     */
    public Date getStopEndTime() {
        return stopEndTime;
    }

    /**
     * @param stopEndTime the stopEndTime to set
     */
    public void setStopEndTime(Date stopEndTime) {
        this.stopEndTime = stopEndTime;
    }

    /**
     * @return the pubBeginTimeMs
     */
    public Long getPubBeginTimeMs() {
        return pubBeginTimeMs;
    }

    /**
     * @param pubBeginTimeMs the pubBeginTimeMs to set
     */
    public void setPubBeginTimeMs(Long pubBeginTimeMs) {
        this.pubBeginTimeMs = pubBeginTimeMs;
    }

    /**
     * @return the pubEndTimeMs
     */
    public Long getPubEndTimeMs() {
        return pubEndTimeMs;
    }

    /**
     * @param pubEndTimeMs the pubEndTimeMs to set
     */
    public void setPubEndTimeMs(Long pubEndTimeMs) {
        this.pubEndTimeMs = pubEndTimeMs;
    }

    /**
     * @return the stopBeginTimeMs
     */
    public Long getStopBeginTimeMs() {
        return stopBeginTimeMs;
    }

    /**
     * @param stopBeginTimeMs the stopBeginTimeMs to set
     */
    public void setStopBeginTimeMs(Long stopBeginTimeMs) {
        this.stopBeginTimeMs = stopBeginTimeMs;
    }

    /**
     * @return the stopEndTimeMs
     */
    public Long getStopEndTimeMs() {
        return stopEndTimeMs;
    }

    /**
     * @param stopEndTimeMs the stopEndTimeMs to set
     */
    public void setStopEndTimeMs(Long stopEndTimeMs) {
        this.stopEndTimeMs = stopEndTimeMs;
    }

    /**
     * @return the titleKeyword
     */
    public String getTitleKeyword() {
        return titleKeyword;
    }

    /**
     * @param titleKeyword the titleKeyword to set
     */
    public void setTitleKeyword(String titleKeyword) {
        this.titleKeyword = titleKeyword;
    }
    
}
